package com.example.curriculum.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import jakarta.persistence.*;

import java.time.LocalDate;

@Table(name = "OutBound")
@Entity
public class OutBound {
    @Id
    @Column(name = "BillId")
    @JsonProperty("bill_id")
    private String bill_id; // 提单号
    @Column(name = "UserId")
    @JsonProperty("user_id")
    private String user_id; // 用户id
    @Column(name = "QteOut")
    @JsonProperty("qte_out")
    private Double qte_out; // 出库件数
    @Column(name = "WeightOut")
    @JsonProperty("weight_out")
    private Double weight_out; // 出库吨数
    @Column(name = "TimeOut")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate time_out; // 开船日

    public OutBound() {
    }

    public OutBound(String bill_id, String user_id, Double qte_out, Double weight_out, LocalDate time_out) {
        this.bill_id = bill_id;
        this.user_id = user_id;
        this.qte_out = qte_out;
        this.weight_out = weight_out;
        this.time_out = time_out;
    }

    public String getBill_id() {
        return bill_id;
    }

    public void setBill_id(String bill_id) {
        this.bill_id = bill_id;
    }

    public String getUser_id() {
        return user_id;
    }

    public void setUser_id(String user_id) {
        this.user_id = user_id;
    }

    public Double getQte_out() {
        return qte_out;
    }

    public void setQte_out(Double qte_out) {
        this.qte_out = qte_out;
    }

    public Double getWeight_out() {
        return weight_out;
    }

    public void setWeight_out(Double weight_out) {
        this.weight_out = weight_out;
    }

    public LocalDate getTime_out() {
        return time_out;
    }

    public void setTime_out(LocalDate time_out) {
        this.time_out = time_out;
    }

    @Override
    public String toString() {
        return "OutBound{" +
                "bill_id='" + bill_id + '\'' +
                ", user_id='" + user_id + '\'' +
                ", qte_out=" + qte_out +
                ", weight_out=" + weight_out +
                ", time_out=" + time_out +
                '}';
    }
}
